import { lazy } from "react";
import { createBrowserRouter } from "react-router-dom";
const App = lazy(() => import("../App"));
const Home = lazy(() => import("../prose/Home/Index"));
const Homeone = lazy(() => import("../prose/Homeone/Index"));
const List = lazy(() => import("../prose/List/Index"));
const Boke = lazy(() => import("../prose/Boke/Index"));
const Work = lazy(() => import("../prose/Work/Index"));
const Zhuce = lazy(() => import("../prose/Zhuce/Index"));
const Login = lazy(() => import("../prose/Login/Index"));
const Cuo = lazy(() => import("../prose/Cuo/Index"));
export const erjily = [
  {
    path: "/home/one",
    element: <Homeone />,
    title:'主页',
    en:'zhuye'
  },
  {
    path: "/home/liet",
    element: <List />,
    title:'生活',
    en:'shenghuo'
  },
  {
    path: "/home/boke",
    element: <Boke />,
    title:'时间轴',
    en:'shijianzho'
  },
  {
    path: "/home/work",
    element: <Work />,
    title:'照片',
    en:'zhaopian'
  },
];
const router = createBrowserRouter([
  {
    path: "/",
    element: <App />,
    children: [
      {
        index: true,
        element: <Home />,
      },
      {
        path: "home",
        element: <Home />,
        children: erjily,
      },
      {
        path: "login",
        element: <Login />,
      },
      {
        path: "/zhuce",
        element: <Zhuce />,
      },
    ],
  },
  {
    path: "*",
    element: <Cuo />,
  },
]);
export default router;
